package main

type student struct {
	name  string
	score int
}

func (s student) CompareTo(other student) int {
	return s.score - other.score
}

func (s student) Equals(other student) bool {
	return s.name == other.name
}

func newStudent(name string, score int) student {
	return student{
		name:  name,
		score: score,
	}
}

type students struct {
	student []student
}

func (s students) Len() int {
	return len(s.student)
}

func (s students) Less(i, j int) bool {
	return s.student[i].score < s.student[j].score
}

func (s students) Swap(i, j int) {
	tem := s.student[i]
	s.student[i] = s.student[j]
	s.student[j] = tem
}
